In a Power-over-Ethernet (PoE) lighting system luminaires are powered and controlled via Ethernet cables. Such a PoE lighting system generally further comprises sensors, wherein each sensor is assigned to a certain subgroup of luminaires, which is defined, for instance, by being located in the same room of a building. The sensor is, for example, a presence sensor for detecting the presence of persons close to the respective subgroup of luminaires such that the subgroup of luminaires can be controlled depending on whether persons are present close to the luminaires or not. A PoE lighting system of a building may comprise few thousand luminaires and few hundred sensors, wherein each subgroup of luminaires has to be assigned to one or several sensors. This assigning procedure is a very tedious task, which is generally performed by an installer when installing the PoE lighting system.